<template>
	<view class="card" :style="[Style]" @click="$emit('onCard')">
		<slot></slot>

	</view>
</template>

<script>
	export default {
		name: 'Wrapper',
		props: {
			margin: {
				type: Object,
				default: () => {
					return {
						top: '30',
					}
				}
			}
		},
		filters: {

		},

		computed: {

			Style() {
				let { top, left, right, bottom } = this.margin
				return {
					margin: `${top || 0}rpx ${left || 0}rpx ${right || 0}rpx ${bottom || 0}rpx `
				}
			}
		},
		data() {
			return {}
		},
		methods: {}

	}
</script>

<style lang="scss" scoped>
	.card {
		background-color: #fff;
		// margin-top: 30rpx;
		padding: 0 20rpx;
		overflow: hidden;
		border-radius: 20rpx;
		box-shadow: 0 30rpx 18rpx -14rpx #E6EBF2;



	}
</style>
